﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListarJogos.aspx.cs" Inherits="SFsoftSite.Jogos.ListarJogos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <h1 style="padding-left:30px">
                Lista de Jogos
            </h1>
            <br />
            <table align="center">
                <tr>
                    <td>
                        Filtro:
                    </td>
                    <td>
                        <asp:TextBox ID="txtFiltro" runat="server" Width="248px"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                    <td>
                        Filtrar Por:
                    </td>
                    <td>
                        <asp:DropDownList ID="cbFiltrarPor" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <asp:Button ID="btnFiltrar" runat="server" Text="Filtrar" OnClick="btnFiltrar_Click" />
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <asp:Repeater runat="server" ID="rptJogos" onitemcommand="rptJogos_ItemCommand">
                <HeaderTemplate>
                    <table align="center">
                        <tr>
                </HeaderTemplate>
                <ItemTemplate>

                        <%# (Container.ItemIndex % 3 == 0 && Container.ItemIndex != 0 ? "</tr><tr>" : string.Empty) %>

                        <td style="width:33.33%; text-align:center">
                            <img src='../Resources/Images/Upload/Games/<%# Eval("Foto") %>' alt="" />
                            <br />
                            <asp:Label ID="Label1" Text='<%# Eval("Nome") %>' runat="server" />
                            <br />
                            <asp:Label ID="Label2" Text='<%# "R$ " + Eval("Preco") %>' runat="server" />
                            <br />
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Resources/Images/btnComprar.png" CommandName="ComprarJogo" CommandArgument='<%# Eval("ID") %>' />
                            <br />
                            <br />
                            <br />
                        </td>

                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
